since output goes in current buffer. Use shell-command-switch.
(defun shell-command-to-string (command)
"Execute shell command COMMAND and return its output as a string."
(with-output-to-string
- (call-process shell-file-name nil t nil "-c" command)))
+ (with-current-buffer
+ standard-output
+ (call-process shell-file-name nil t nil shell-command-switch command))))
\f
(defconst universal-argument-map
(let ((map (make-sparse-keymap)))